package com.lbj.mall.common.exception;

/**
 * 异常错误枚举
 */
public enum AppException {

    USERNAME_PASSWORD_ERROR(107, "用户名或密码错误"),
    EMAIL_ILLEGAL(106, "邮箱格式不合法"),
    EMAIL_EXIST(105, "邮箱已存在"),
    USERNAME_EXIST(104, "用户名已存在"),
    EMAIL_SEND(103, "邮箱验证码发送频繁"),
    ES_SAVE(102, "商品上架失败"),
    VERIFY(101, "数据校验异常"),
    UNKNOWN(100, "未知异常");


    private int code;
    private String msg;

    AppException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
